package sketch.metapost;

public class MPDraw implements MPCode {

	private MPColor color;

	private MPObject object;

	public MPDraw(MPObject o, MPColor c) {
		color = c;
		object = o;
	}

	public MPDraw(MPObject o) {
		this(o, MPColor.BLACK);
	}

	public String getActionCode() {
		return "draw";
	}

	public String getObjectCode() {
		return object.getCode();
	}

	public String getOptionCode() {
		return "withcolor " + color.getCode();
	}

	public String getCode() {
		return getActionCode() + " " + getObjectCode() + " " + getOptionCode();
	}


}
